package com.java.gamePackeg.event;

import com.java.gamePackeg.Player;
import com.java.gamePackeg.Product;
import com.java.gamePackeg.XianLiveMain;

import javax.swing.*;
import java.util.List;

public class FreeProsEvent1 implements Event {
    private static final int FREE_PRO_COUNT = 5;

    public void event(Player player, List<Product> marketProList) {
        JOptionPane.showMessageDialog(null, "遇到盗版手机销售,送我" + FREE_PRO_COUNT + "部盗版手机");
        Product product = XianLiveMain.getProList().get(5);
        product.setNowPrice(0);
        player.buyPro(product, FREE_PRO_COUNT, false);
    }
}
